package com.ai.module.user.mapper;

import com.ai.module.chat.common.domain.vo.chat.ChatContent;
import com.ai.module.user.domain.entity.ChatContentEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface ChatContentMapper extends BaseMapper<ChatContentEntity> {

    @Select("select * from chat_content where robot_id=  #{robotId} and user_id = #{userId} order by id desc")
    Page<ChatContent> selectCurrentChatList(Page<ChatContentEntity> objectPage,
                                            @Param("robotId") String robotId,
                                            @Param("userId") String userId);

}
